/* SPDX-License-Identifier: GPL-2.0 */
/*
 * vim: noexpandtab sw=8 ts=8 sts=0:
 *
 * Created by:	Qiu Zhao, 2023-04-12
 * Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved.
 */

#ifndef _OCFS_UNMAP_H
#define _OCFS_UNMAP_H

#include <linux/fs.h>
#include <linux/types.h>
#include <linux/slab.h>
#include <linux/highmem.h>
#include <linux/swap.h>
#include <linux/quotaops.h>
#include <linux/blkdev.h>
#include <linux/sched/signal.h>
#include "cluster/masklog.h"
#include "ocfs2.h"
#include "alloc.h"
void ocfs2_update_unmap_stats(struct super_block *sb, int len,
		ktime_t before, ktime_t after);
void ocfs2_schedule_clear_unmap_log(struct ocfs2_super *osb,
		int cancel);
void ocfs2_schedule_unmap_log_flush(struct ocfs2_super *osb,
		int cancel);
int ocfs2_get_unmap_log_info(struct ocfs2_super *osb,
		int slot_num,
		struct inode **ul_inode,
		struct buffer_head **ul_bh);
int ocfs2_unmap_log_init(struct ocfs2_super *osb);
#endif
